package cn.ztydata.teachingsystem.heaven.web.dto.exercise;


import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 填空Dto
 * Created by wyh on 2015/2/4.
 */
public class BlankDto {
    private Long blankId; //填空项ID

    @NotNull
    @Min(value = 1, message = "填空数不能少于1")
    private Integer answerCount;//答案数

    @NotNull
    @Range(min = 0, max = 1, message = "参数不合法")
    private Integer hasFormula;//是否含公式：0不含  1含

    @Valid
    @NotNull
    @Size(min = 1, message = "填空数不能少于1")
    private List<BlankSolutionDto> options;//填空答案

    public Integer getAnswerCount() {
        return answerCount;
    }

    public void setAnswerCount(Integer answerCount) {
        this.answerCount = answerCount;
    }

    public Integer getHasFormula() {
        return hasFormula;
    }

    public void setHasFormula(Integer hasFormula) {
        this.hasFormula = hasFormula;
    }

    public List<BlankSolutionDto> getOptions() {
        return options;
    }

    public void setOptions(List<BlankSolutionDto> options) {
        this.options = options;
    }

    public Long getBlankId() {
        return blankId;
    }

    public void setBlankId(Long blankId) {
        this.blankId = blankId;
    }
}
